package com.cn.lp.arthas;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

import java.io.IOException;

@SpringBootApplication
@Slf4j
public class ArthasApplication {

    public static void main(String[] args) throws InterruptedException, IOException {
        ConfigurableApplicationContext context = SpringApplication.run(ArthasApplication.class, args);
        String[] profiles = context.getEnvironment().getActiveProfiles();
        if (profiles.length != 0) {
            System.out.println(profiles[0]);
        }
        Arthas.thread();
        Arthas arthas = new Arthas();
        System.out.println(arthas.toString());
        System.out.println(arthas.add());
        System.out.println(arthas.getNum());
    }

}
